-define(FORMAT_LIST,[16#00000001 ,
 16#00000002 ,
 16#00000004 ,
 16#00000008 ,
 16#00000010 ,
 16#00000020 ,
 16#00000040 ,
 16#00000080 ,
 16#00000100 ,
 16#00000200 ,
 16#00000400 ,
 16#00000800 ,
 16#00001000 ,
 16#00002000 ,
 16#00010000 ,
 16#00020000 ,
 16#00040000 ,
 16#00080000 ,
 16#00100000 ,
 16#00200000 ]).
-define(FORMAT_MAP,[{16#00000001,g_723_1},
{16#00000002,gsm_full_rate},
{16#00000004,g_711_mu_law},
{16#00000008,g_711_a_law},
{16#00000010,g_726},
{16#00000020,ima_adpcm},
{16#00000040,'16_bit_linear'},
{16#00000080,lpc10},
{16#00000100,g_729},
{16#00000200,speex},
{16#00000400,ilbc},
{16#00000800,g_726_aal2},
{16#00001000,g_722},
{16#00002000,amr},
{16#00010000,jpeg},
{16#00020000,png},
{16#00040000,h_261},
{16#00080000,h_263},
{16#00100000,h_263p},
{16#00200000,h_264}]).


-define(FRAME_TYPE_MAP,[{dtmf,	16#01},
{voice,	16#02},
{video,	16#03},
{control,	16#04},
{null,	16#05},
{iax,	16#06},
{text,	16#07},
{image,	16#08},
{html	,16#09},
{comfort_noise,	16#0A},
{t_38_primary_ifp_frame,	16#0B}]).

-define(IAX_SUBCLASSES_MAP,[{	new	,	16#01	},
{	ping	,	16#02	},
{	pong	,	16#03	},
{	ack	,	16#04	},
{	hangup	,	16#05	},
{	reject	,	16#06	},
{	accept	,	16#07	},
{	authreq	,	16#08	},
{	authrep	,	16#09	},
{	inval	,	16#0A	},
{	lagrq	,	16#0B	},
{	lagrp	,	16#0C	},
{	regreq	,	16#0D	},
{	regauth	,	16#0E	},
{	regack	,	16#0F	},
{	regrej	,	16#10	},
{	regrel	,	16#11	},
{	vnak	,	16#12	},
{	dpreq	,	16#13	},
{	dprep	,	16#14	},
{	dial	,	16#15	},
{	txreq	,	16#16	},
{	txcnt	,	16#17	},
{	txacc	,	16#18	},
{	txready	,	16#19	},
{	txrel	,	16#1A	},
{	txrej	,	16#1B	},
{	quelch	,	16#1C	},
{	unquelch	,	16#1D	},
{	poke	,	16#1E	},
{	reserved	,	16#1F	},
{	mwi	,	16#20	},
{	unsupport	,	16#21	},
{	transfer	,	16#22	},
{	reserved	,	16#23	},
{	reserved	,	16#24	},
{	reserved	,	16#25	},
{	txmedia	,	16#26	},
{	rtkey	,	16#27	},
{	calltoken	,	16#28	},
{	t38_request_negotiate	,	16#30	},
{	t38_request_terminate	,	16#31	},
{	t38_negotiated	,	16#32	},
{	t38_terminated	,	16#33	},
{	t38_refused	,	16#34	}]).

-define(CONTROL_SUBCLASSES_MAP,[{	hangup	,	16#01	},
{	reserved	,	16#02	},
{	ringing	,	16#03	},
{	answer	,	16#04	},
{	busy	,	16#05	},
{	reserved	,	16#06	},
{	reserved	,	16#07	},
{	congestion	,	16#08	},
{	flash_hook	,	16#09	},
{	reserved	,	16#0A	},
{	option	,	16#0B	},
{	key_radio	,	16#0C	},
{	unkey_radio	,	16#0D	},
{	call_progress	,	16#0E	},
{	call_proceeding	,	16#0F	},
{	hold	,	16#10	},
{	unhold	,	16#11	}]).


-define(IE_MAP,[
{	ie_called_number,	16#01	},
{	ie_calling_number,	16#02	},
{	ie_calling_ani	,	16#03	},
{	ie_calling_name	,	16#04	},
{	ie_called_context,	16#05	},
{	ie_username	,	16#06	},
{	ie_password	,	16#07	},
{	ie_capability	,	16#08	},
{	ie_format	,	16#09	},
{	ie_language	,	16#0a	},
{	ie_version	,	16#0b	},
{	ie_adsicpe	,	16#0c	},
{	ie_dnid	,		16#0d	},
{	ie_authmethods	,	16#0e	},
{	ie_challenge	,	16#0f	},
{	ie_md5_result	,	16#10	},
{	ie_rsa_result	,	16#11	},
{	ie_apparent_addr,	16#12	},
{	ie_refresh	,	16#13	},
{	ie_dpstatus	,	16#14	},
{	ie_callno	,	16#15	},
{	ie_cause	,	16#16	},
{	ie_iax_unknown	,	16#17	},
{	ie_msgcount	,	16#18	},
{	ie_autoanswer	,	16#19	},
{	ie_musiconhold	,	16#1a	},
{	ie_transferid	,	16#1b	},
{	ie_rdnis	,	16#1c	},
{	ie_reserved	,	16#1d	},
{	ie_reserved	,	16#1e	},
{	ie_datetime	,	16#1f	},
{	ie_reserved	,	16#20	},
{	ie_reserved	,	16#21	},
{	ie_reserved	,	16#22	},
{	ie_reserved	,	16#23	},
{	ie_reserved	,	16#24	},
{	ie_reserved	,	16#25	},
{	ie_callingpres	,	16#26	},
{	ie_callington	,	16#27	},
{	ie_callingtns	,	16#28	},
{	ie_samplingrate	,	16#29	},
{	ie_causecode	,	16#2a	},
{	ie_encryption	,	16#2b	},
{	ie_enckey	,	16#2c	},
{	ie_codec_prefs	,	16#2d	},
{	ie_rr_jitter	,	16#2e	},
{	ie_rr_loss	,	16#2f	},
{	ie_rr_pkts	,	16#30	},
{	ie_rr_delay	,	16#31	},
{	ie_rr_dropped	,	16#32	},
{	ie_rr_ooo	,	16#33	},
{	ie_osptoken	,	16#34	}]).




-record(fullframe, {srccallnumber,
					r=0,
					dstcallnumber,
					timestamp,
					oseqno,
					iseqno,
					frametype,
					c,
					subclass,
					data}).

-record(ie_protocol_ver,{version}).
-record(ie_calling_number,{calling_number}).
-record(ie_calling_name,{calling_name}).
-record(ie_called_number,{called_number}).
-record(ie_calling_ani,{calling_ani}).
-record(ie_called_context,{called_context}).
-record(ie_username,{username}).
-record(ie_password,{password}).
-record(ie_capability,{capability}).
-record(ie_format,{format}).
-record(ie_language,{language}).
-record(ie_version,{version}).
-record(ie_adsicpe,{adsicpe}).
-record(ie_dnid,{dnid}).
-record(ie_authmethods,{authmethods}).
-record(ie_challenge,{challenge}).
-record(ie_md5_result,{md5_result}).
-record(ie_rsa_result,{rsa_result}).
-record(ie_apparent_addr,{apparent_addr}).
-record(ie_refresh,{refresh}).
-record(ie_dpstatus,{dpstatus}).
-record(ie_callno,{callno}).
-record(ie_cause,{cause}).
-record(ie_iax_unknown,{iax_unknown}).
-record(ie_msgcount,{newmsgs,oldmsgs}).
-record(ie_autoanswer,{autoanswer}).
-record(ie_musiconhold,{musiconhold}).
-record(ie_transferid,{transferid}).
-record(ie_rdnis,{rdnis}).
-record(ie_datetime,{year,month,day,hours,minutes,seconds}).
-record(ie_reserved,{reserved}).
-record(ie_callingpres,{callingpres}).
-record(ie_callington,{callington}).
-record(ie_callingtns,{ton,plan,netid}).
-record(ie_samplingrate,{samplingrate}).
-record(ie_causecode,{causecode}).
-record(ie_encryption,{encryption}).
-record(ie_enckey,{enckey}).
-record(ie_codec_prefs,{codec_prefs}).
-record(ie_rr_jitter,{rr_jitter}).
-record(ie_rr_loss,{rr_loss_percent,rr_loss_count}).
-record(ie_rr_pkts,{rr_pkts}).
-record(ie_rr_delay,{rr_delay}).
-record(ie_rr_dropped,{rr_dropped}).
-record(ie_rr_ooo,{rr_ooo}).
-record(ie_osptoken,{osptoken}).
-record(unknown,{content}).

-record(make_call_req,{calleridname,
					   calleridnum,
					   extension,
					   context}).